Add Kafka integration tests and deploy-kafka EaaS task#93
Open
lubomir wants to merge 1 commit into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #93 +/- ##
==========================================
- Coverage 83.69% 83.65% -0.04%
==========================================
Files 13 13
Lines 1325 1328 +3
==========================================
+ Hits 1109 1111 +2
- Misses 216 217 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- Deploy single-node Apache Kafka broker (KRaft mode) in the EaaS ephemeral namespace before CTS starts, using emptyDir volumes to satisfy the restricted-v2 SCC on OpenShift. - Add a long-lived module-scoped kafka_consumer fixture that subscribes to all three CTS topics and acts as a cursor; an autouse drain check after every test ensures no message is silently left unconsumed. - Introduce CTSClient to pair an HTTP client with the Kafka consumer. Tag management methods (create_tag, add/remove_tagger/untagger) are members of CTSClient alongside the compose helpers, so every mutating action in tests uses a consistent interface. - Kafka assertions (compose-created, compose-tagged, compose-untagged) are embedded in CTSClient.import_compose, tag_compose, and untag_compose via _assert_compose_message; they activate only when KAFKA_URL is set so all tests continue to run without a broker. - Fix messaging.py: convert the string 'none' to None for compression_type so kafka-python selects no compression correctly. - Add kafka-python to test-requirements.txt; pass KAFKA_URL=kafka:9092 to pytest in the run-tests step. Generated-By: OpenCode (google-vertex-anthropic/claude-sonnet-4-6@default)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deploy single-node Apache Kafka broker (KRaft mode) in the EaaS ephemeral namespace before CTS starts, using emptyDir volumes to satisfy the restricted-v2 SCC on OpenShift.
Add a long-lived module-scoped kafka_consumer fixture that subscribes to all three CTS topics and acts as a cursor; an autouse drain check after every test ensures no message is silently left unconsumed.
Introduce CTSClient to pair an HTTP client with the Kafka consumer. Tag management methods (create_tag, add/remove_tagger/untagger) are members of CTSClient alongside the compose helpers, so every mutating action in tests uses a consistent interface.
Kafka assertions (compose-created, compose-tagged, compose-untagged) are embedded in CTSClient.import_compose, tag_compose, and untag_compose via _assert_compose_message; they activate only when KAFKA_URL is set so all tests continue to run without a broker.
Fix messaging.py: convert the string 'none' to None for compression_type so kafka-python selects no compression correctly.
Add kafka-python to test-requirements.txt; pass KAFKA_URL=kafka:9092 to pytest in the run-tests step.